<?php


/*
 *  A Part of snock project
 *   Author king-of-war
 * Last modified 2009-4-20
 *
 */
 @session_start();
 echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';

$root_path = '../'; //set the root path for this file

include_once $root_path . 'admin/smarty_config.php';
include_once $root_path . 'admin/class/company.class.php';
/*
 *
 * check identify
 */
include_once $root_path.'admin/class/verify.class.php';
$a=new verify($root_path);
$a->identity_check(3);

/*
 * init vars
 */
$company = new company($root_path);

$companys = $company->company_get();
/*
 * process
 */
$info = '配置公司信息';
if (isset ($_POST['submit'])) {
	$name = $_POST['name'];
	$notice = $_POST['notice'];
	$phone = $_POST['phone'];
	$zip_code = $_POST['zip_code'];
	$linkman= $_POST['linkman'];
	$mail = $_POST['mail'];
	$address = $_POST['address'];
$icp = $_POST['icp'];
$line=$company->company_updata($name,$notice,$phone,$zip_code,$linkman,$mail,$address,$icp);
	if($line){
		$info="更新成功";
	}else{
		$info="更新成功";
	}

}

/*
 * set templates
 *
 */
$smarty->assign("info", $info);
$smarty->assign("company", $companys);
$smarty->display("company.html");
?>
